package com.hemaapp.yjnh.view;

import com.hemaapp.yjnh.R;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.util.AttributeSet;

/**
 *
 */
public class SoundProgressBarTa extends SoundProgressBar {

	public SoundProgressBarTa(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		set();
	}

	public SoundProgressBarTa(Context context, AttributeSet attrs) {
		super(context, attrs);
		set();
	}

	public SoundProgressBarTa(Context context) {
		super(context);
		set();
	}

	void set() {
		setImageResource(R.drawable.chat_sound_3);
		mHandler = new Handler() {
			@Override
			public void handleMessage(Message msg) {
				switch (msg.what) {
				case 1:
					setImageResource(R.drawable.chat_sound_1);
					break;
				case 2:
					setImageResource(R.drawable.chat_sound_2);
					break;
				case 3:
					setImageResource(R.drawable.chat_sound_3);
					break;
				default:
					break;
				}
				super.handleMessage(msg);
			}
		};
		super.set();
	}

}
